<?php if(count($ctx->getPhotos['result'])>0) { ?>
<div id="topPagerId" class="paginat" style="padding-right:15px;"></div><div class="clear"></div>
<tal:block tal:repeat="photos  getPhotos/result">
<?php 
if($ctx->photos['is_owner']==1)
{
		$name = $ctx->photos['cnt'].' <a href=/album/photos/photos-view/'.base64_encode($ctx->type).'/'.base64_encode($ctx->photos['Photos']['photo_diffid']).'>photo(s)</a>  are Added';
		$profPic = '/Uploads/users/'.$ctx->photos['photo'];
	$shareTpye = 'Shared';
	$shareIcon = 'SendIconSm.png';
	$shareAlt = "Sent";
	$is_owner=1;
	
}
else
{
	$name =$ctx->photos['cnt'].' <a href=/album/photos/photos-view/'.base64_encode($ctx->type).'/'.base64_encode($ctx->photos['Photos']['photo_diffid']).'>photo(s)</a> shared by  '.$ctx->photos['first_name'];
		$profPic = '/Uploads/users/'.$ctx->photos['photo'];
	$shareTpye = 'Received';
	$shareIcon = 'ReceiveIconSm.png';
	$shareAlt = "Receive";
	$is_owner=0;
}

 ?>
<div class="PhoVid">
<?php if($ctx->photos['read_status'] == 0) { $class="act";} else { $class="nor"; } ?>
<div class="<?php echo $class;?>">
<div class="blkCont">
<div class="Icon"><img src="/images/PhotoIconUser.png" /></div>
<p class="UserImg">
<img src="<?php echo $profPic; ?>" height="45" width="45" alt="Profile" title="Profile"/></p>
<p class="Date"> <?php echo ago(strtotime($ctx->photos['Photos']['added_date'])) ?></p>
</div>
<div class="blkCont">
<div class="wid240">
<p class="Title"><?php echo $name;?></p>
<p class="Desc"><span tal:content="structure php: this.SubStrText(photos['Photos']['description'], 50)">Des Here</span></p>
<?php if(isset($ctx->photos['cnt']) && $ctx->photos['cnt']!='') { 
	$cnt = $ctx->photos['cnt1']; 
	} else {
	$cnt = 0;
//echo $cnt;exit;	
	}
?>
</div>
</div>
<div class="blkContRt">
<?php if($shareIcon != '') { ?>
  <span><img src="/images/<?php echo $shareIcon;?>" alt="<?php echo $shareAlt;?>" title="<?php echo $shareAlt;?>" /></span>
 <?php } ?>
<span><a href="javascript:void(0);" onclick="deletePhoto(<?php echo $ctx->photos['Photos']['photo_id']?>,'<?php echo $ctx->photos['Photos']['photo_diffid']?>','<?php echo $is_owner;?>');"><img src="/images/CloseIcon.png" alt="Close" border="0" class="img_inline" title="Delete"/></a></span>

</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</tal:block>
<div id="downPagerId1" class="paginat" style="padding-right:15px;"></div><div class="clear"></div>
<?php } else { ?>
<p style="padding:100px 100px"><b><center>No Photos found</center></b></p>
<?php } ?>
<script type="text/javascript">
//<![CDATA[

	pagination1 = new Array();
	pagination1['currentPage'] = "<?=$ctx->getPhotos['currentPage']?>";
	pagination1['resultsPerPage'] = "<?=$ctx->getPhotos['resultPerPage']?>";
	pagination1['pages'] = "<?= $ctx->getPhotos['pages']?>";  
	pagination1['pager'] = '<?=$ctx->getPhotos["pager"]?>';
	pagination1['resultsCount'] = "${getPhotos/resultsCount}" ;
	
	var Params='${params}';
	var ParamsDup='';
	//alert(pagination['resultsCount']+'  '+Params);
	var requestUrlDup = "/album/Photos/pagination/<?php echo $ctx->type; ?>/";
	//var requestUrlDup = "/user/myhome/ajax-news/0/";
	$(document).ready(function () {
	   setPagination1(pagination1['resultsCount'],'','downPagerId1','','');
	});
//]]>
</script>


